Text mode is a computer monitor mode in which content is internally represented on a computer screen in terms of characters rather than individual . Typically, the screen consists of a uniform regular grid of character cells, each of which contains one of the characters of a character set; at the same time, contrasted to graphics mode or other kinds of computer graphics modes.
Text mode applications communicate with the user by using command-line interfaces and text user interfaces. Many character sets used in text mode applications also contain a limited set of predefined semi-graphical characters usable for drawing boxes and other rudimentary graphics, which can be used to highlight the content or to simulate Graphical widget or control interface objects found in GUI programs. A typical example is the IBM code page 437 character set.
An important characteristic of text mode programs is that they assume , where every character has the same width on screen, which allows them to easily maintain the vertical alignment when displaying semi-graphical characters. This was an analogy of early mechanical printers which had fixed pitch. This way, the output seen on the screen could be sent directly to the printer maintaining the same format.
Depending on the environment, the framebuffer can be directly addressable. Programs that display output on remote video terminals must issue special Escape sequence to manipulate the screen buffer. The most popular standards for such control sequences are ANSI and VT100.
Programs accessing the screen buffer through control sequences may lose synchronization with the actual display so that many text mode programs have a redisplay everything command, often associated with the key combination.
Text mode avoids the problem of expensive memory by having dedicated display hardware re-render each line of text from characters into pixels with each scan of the screen by the cathode ray. In turn, the display hardware needs only enough memory to store the pixels equivalent to one line of text (or even less) at a time. Thus, the computer's screen buffer only stores and knows about the underlying text characters (hence the name "text mode") and the only location where the actual pixels representing those characters exist as a single unified image is the screen itself, as viewed by the user (thanks to the phenomenon of persistence of vision).
For example, a screen buffer sufficient to hold a standard grid of 80 by 25 characters requires at least 2,000 bytes. Assuming a monochrome display, 8 bits per byte, and a standard size of 8 times 8 bits for each character, a framebuffer large enough to hold every pixel on the resulting screen would require at least 128,000 bits, 16,000 bytes, or just under 16 kilobytes. By the standards of modern computers, these may seem like trivial amounts of memory, but to put them in context, the original Apple II was released in 1977 with only four kilobytes of memory and a price of $1,300 in U.S. dollars (at a time when the minimum wage in the United States was only $2.30 per hour). Furthermore, from a business perspective, the business case for text terminals made no sense unless they could be produced and operated more cheaply than the paper-hungry teleprinters they were supposed to replace.
Another advantage of text mode is that it has relatively low bandwidth requirements in remote terminal use. Thus, a text mode remote terminal can necessarily update the screen much faster than a graphics mode remote terminal linked to the same amount of bandwidth (and in turn will seem more responsive), since the remote server may only need to transmit a few dozen bytes for each screen update in text mode, as opposed to complex raster graphics remote procedure calls that may require the transmission and rendering of entire .
Text mode rendering with user-defined characters has also been useful for 2D Video game because the game screen can be manipulated much faster than with pixel-oriented rendering.
| !
|0 0 0 0 0||0 0 0 0 1||0 0 0 1 0||0 0 0 1 1||0 0 1 0 0||0 0 1 0 1||0 0 1 1 0||0 0 1 1 1||00000000 11111111 00001111 00110011 01010101|11… 00… 00… 00… 01… | |||||||||||
| 01000 01001 … | … … … | ||||||||||
| 384px]] A sample of character box and corresponding electronic scheme. The glyph is 8×8 pixels, with 3-bit low parts of scan line and dot counter. The screen is between 20×18 and 32×32 character cells, with 5-bit indices. | |||||||||||
The character memory resides in read-only memory in some systems. Other systems allow the use of RAM for this purpose, making it possible to redefine the typeface and even the character set for application-specific purposes. The use of RAM-based characters also facilitates some special techniques, such as the implementation of a pixel-graphics frame buffer by reserving some characters for a bitmap and writing pixels directly to their corresponding character memory. In some historical graphics chips, including the TMS9918, the MOS Technology VIC, and the Game Boy graphics hardware, this was actually the canonical way of doing pixel graphics.
Text modes often assign attributes to the displayed characters. For example, the VT100 terminal allows each character to be underlined, brightened, blinking or inverse. Color-supporting devices usually allow the color of each character, and often the background color as well, to be selected from a limited palette of colors. These attributes can either coexist with the character indices or use a different memory area called color memory or attribute memory. Text mode layout and palette
Some text mode implementations also have the concept of line attributes. For example, the VT100-compatible line of text terminals supports the doubling of the width and height of the characters on individual text lines.
| 80×25 | 9×14 | 720×350 | B&W text | MDA, Hercules |
| 40×25 | 8×8 | 320×200 | 16 colors | CGA, EGA |
| 80×25 | 8×8 | 640×200 | 16 colors | CGA, EGA |
| 80×25 | 8×14 | 640×350 | 16 colors | EGA |
| 80×43 | 8×8 | 640×350 | 16 colors | EGA |
| 80×25 | 9×16 | 720×400 | 16 colors | VGA |
| 80×30 | 8×16 | 640×480 | 16 colors | VGA |
| 80×50 | 9×8 | 720×400 | 16 colors | VGA |
| 80×60 | 16 colors | VESA-compatible Super VGA | ||
| 132×25 | 16 colors | VESA-compatible Super VGA | ||
| 132×43 | 16 colors | VESA-compatible Super VGA | ||
| 132×50 | 16 colors | VESA-compatible Super VGA | ||
| 132×60 | 16 colors | VESA-compatible Super VGA | ||
MDA text could be emphasized with bright, underline, reverse and blinking attributes.
Video cards in general are backward compatible, i.e. EGA supports all MDA and CGA modes, VGA supports MDA, CGA and EGA modes.
By far the most common text mode used in DOS environments, and initial Windows consoles, is the default 80 columns by 25 rows, or 80×25, with 16 colors. This mode was available on practically all IBM and compatible personal computers. Several programs, such as terminal emulators, used only 80×24 for the main display and reserved the bottom row for a status bar.
Two other VGA text modes, 80×43 and 80×50, exist but were very rarely used. The 40-column text modes were never very popular outside games and other applications designed for compatibility with television monitors, and were used only for demonstration purposes or with very old hardware.
Character sizes and graphical resolutions for the extended VESA-compatible Super VGA text modes are manufacturer-dependent. Also on these display adapters, available colors can be halved from 16 to 8 when a second customized character set is employed (giving a total repertoire of 512 —instead the common 256— different graphic characters simultaneously displayed on the screen).
Some cards (e.g. S3) supported custom very large text modes, like 100×37 or even 160×120. In Linux systems, a program called SVGATextMode is often used with SVGA cards to set up very large console text modes, such as for use with split-screen terminal multiplexers.
Linux operate in text mode. Most Linux distributions support several virtual console screens, accessed by pressing Control key, Alt and a function key together. The AAlib open source library provides programs and routines that specialize in translating standard image and video files, such as PNG and WMV, and displaying them as a collection of ASCII characters. This enables a rudimentary viewing of graphics files on text mode systems, and on text mode web browsers such as Lynx.
UEFI-based systems provide Unicode text mode output support with Simple Text Output Protocol. Minimum supported text resolution is at least 80×25 and minimal recommended character set includes Basic Latin Unicode characters.
|
|